import {messages} from "share/common";
import React, { Component } from 'react';
import Info from "components/info";
import "styles/finance-setting/auto-check-receipt/auto-check-receipt-setting.scss"

class AutoCheckReceiptSetting extends Component {

  state = {
    loading: false,
    info: {}
  };

  attributes = [{
    title: messages('common.invoice.type')/*发票类型*/,
    dataIndex: 'receiptTypeShowValue',
    span: 24
  }, {
    title: messages('expense-14.key483')/*匹配字段*/,
    dataIndex: 'checkFieldShowValue',
    span: 24
  }];

  render() {
    const { detail: { receiptTypeShowValue, checkFieldShowValue } } = this.props;
    return (
      <div>
        <div style={{ marginBottom: 12 }}>
          <Info
            paragraph
            attributes={[
              {title: messages('expense-14.key485')/*功能概述*/, dataIndex: 'overview', span: 24, widthFix: false},
              {title: messages('expense-14.key492')/*特殊规则*/, dataIndex: 'rule', span: 24, widthFix: false}
            ]}
            dataSource={{
              overview: messages('expense-14.key493')/*系统自动核对线上线下发票一致性，即核对员工录入发票和财务收到的纸质发票扫描件是否一致。精确匹配基于完整的匹配字段进行发票一致性对比*/,
              rule: messages('expense-14.key494')/*部分发票类型没有金额合计、税率、税额字段，则不校验这3个字段*/
            }}
          />
        </div>
        <Info
          attributes={this.attributes}
          dataSource={{
            receiptTypeShowValue,
            checkFieldShowValue
          }}
        />
      </div>
    )
  }
}

export default AutoCheckReceiptSetting;
